package com.wsc.interfaces;

import com.wsc.tools.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 模板接口
 */
@FeignClient(value = "MARKET-COMMON-SERVICE")
@RequestMapping("/template")
public interface TemplateInterface {

    /**
     * 获取字符
     * @param path 地址
     * @param toPath 要写入的地址
     * @param key 值
     * @param model 数据
     * @return 生成的模板字符串
     * @throws Exception
     */
    @PostMapping("/write")
    AjaxResult writeTemplate(@RequestParam("path")String path,
                                    @RequestParam("toPath")String toPath,
                                    @RequestParam("key") String key,
                                    @RequestBody Object model);

}
